/**
 *  RedBag module
 */

import React from 'react';

class RedBag extends React.Component {
    render() {
        const widget = this.props.widget;
        const customSrc = widget.custom && (widget.icon_src || widget.url);
        let redDefaultNode = '';
        if (!customSrc) {
            redDefaultNode = <div className="red_defaul" />;
        }

        let redImgNode = '';
        if (customSrc) {
            redImgNode = <img src={customSrc} className="replaceImge" style={{ width: '100%', height: '100%' }} />;
        }

        return (
          <div className="prevent-interaction">
            <div style={{ width: '100%', height: '100%' }}>
              {redDefaultNode}
              {redImgNode}
            </div>
          </div>
        );
    }
 }
 RedBag.defaultProps = {
     name: $._("AR RedBag"),
     type: 16,
     type_display: $._("AR RedBag"),
     icon_class: "icon-redbag",
     width:147,
     height:188,
     red_game_duration:30,
     red_total_cash:10,
     red_packet_count:10,
     red_allot:1,
     red_ratio:0,
     red_auth:1,
     red_auth_times:0,
     red_auth_age:0,
     red_shared_can_again:0,
     auto_play:0,
     red_custom:0,
     start_time:0,
     has_end_set:1,//是否选定结束条件
     end_by_least_account:10,//账户余额
     brand_name: '幻视AR'
 }

module.exports = RedBag;
